﻿using System;

namespace Common
{
    public class LogHelper
    {
        public static readonly log4net.ILog Loginfo = log4net.LogManager.GetLogger("loginfo");

        public static readonly log4net.ILog Logerror = log4net.LogManager.GetLogger("logerror");

        public static void WriteLog(string info)
        {

            if (Loginfo.IsInfoEnabled)
            {
                Loginfo.Info(info);
            }
        }

        public static void WriteLog(string info, Exception se)
        {
            if (Logerror.IsErrorEnabled)
            {
                Logerror.Error(info, se);
            }
        }
    }
}
